package com.lzy.product.apis.impl;

import com.github.pagehelper.PageInfo;
import com.lzy.framework.core.orm.db.Pager;
import com.lzy.product.apis.ProductInfoProjectServiceApi;
import com.lzy.product.dtos.ProductInfoProjectDto;
import com.lzy.product.service.ProductInfoProjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by WIN7 on 2017/12/1.
 */
@Service
public class ProductInfoProjectServiceApiImpl implements ProductInfoProjectServiceApi {

    @Autowired
    ProductInfoProjectService productInfoProjectService;

    @Override
    public Long insert(ProductInfoProjectDto dto) {
        return productInfoProjectService.insert(dto);
    }

    @Override
    public Boolean update(ProductInfoProjectDto dto) {
        return productInfoProjectService.update(dto);
    }

    @Override
    public Boolean delete(Long id) {
        return null;
    }

    @Override
    public Boolean remove(Long id) {
        return null;
    }

    @Override
    public ProductInfoProjectDto findById(Long id) {
        return null;
    }

    @Override
    public List<ProductInfoProjectDto> query(ProductInfoProjectDto dto) {
        return productInfoProjectService.query(dto);
    }

    @Override
    public PageInfo<ProductInfoProjectDto> selectList(Pager pager, ProductInfoProjectDto dto) {
        return productInfoProjectService.selectList(pager, dto);
    }

    @Override
    public Integer deleteByProductId(ProductInfoProjectDto dto) {
        return productInfoProjectService.deleteByProductId(dto);
    }

    @Override
    public ProductInfoProjectDto findByProductIdAndProjectId(Long productId, Long projectId) {
        return productInfoProjectService.findByProductIdAndProjectId(productId,projectId);
    }

    @Override
    public List<ProductInfoProjectDto> findByProductId(Long productId) {
        return productInfoProjectService.findByProductId(productId);
    }
}
